package com.lvxing.admin.sys.controller;


import com.lvxing.admin.sys.entity.User;
import com.lvxing.admin.sys.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lvxing
 * @since 2019-07-19
 */
@RestController
@RequestMapping("/sys/user")
public class UserController {

    @Autowired
    IUserService userService;

    @PostMapping("/test")
    public String test(@RequestBody List<User> users) {
        userService.saveOrUpdateBatch(users);
        return null;
    }

}
